-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of metadata-based freshness #1072
Implementation of metadata-based freshness #1072
Conversation
@@ -0,0 +1,18 @@ | |||
import pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be in the functional directory?
dataset_ref = DatasetReference(project.database, project.test_schema) | ||
table_ref = TableReference(dataset_ref, table_name) | ||
with pytest.raises(NotFound): | ||
client.get_table(table_ref) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to test the bigquery api?
Freshness tests were added for BigQuery in dbt-labs/dbt-bigquery#1072 and released with [`dbt-bigquery` 1.7.3](https://github.com/dbt-labs/dbt-bigquery/releases/tag/v1.7.3).
Thanks @mikealfare, I've added an update to the docs at dbt-labs/docs.getdbt.com#4784 |
resolves #938
Problem
The current implementation of source freshness requires querying the data and requires the user provide a datetime field. This is slower and more expensive than it should be. It doesn't scale across multiple models. And some models do not have an appropriate datetime field.
Solution
Use source metadata where available.
NOTE: We are releasing to
1.7.latest
first, which is unusual. This PR is a set of cherry picks from #1060. The latter will be updated and merged post adapter/core split work.Checklist